package com.boot.dog.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.boot.dog.common.annotation.DataAuth;
import com.boot.dog.common.enums.DataAuthType;
import com.boot.dog.entities.ao.UserAo;
import com.boot.dog.entities.pojo.User;
import com.boot.dog.entities.vo.UserVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: MaxLv
 * @Date: 2019/12/2
 */
public interface UserMapper extends BaseMapper<User> {

    @DataAuth(tableAlias = "t1", type = DataAuthType.USER)
    IPage<UserVo> selectByPage(Page page, @Param("ao") UserAo ao);

    @DataAuth(tableAlias = "t1", type = DataAuthType.USER)
    List<User> getUserList(@Param("ao") UserAo ao);
}
